#pragma once
#include "CdiRenderBase.h"
#include <d3dx9.h>

class CdiLightingBase : public CdiRenderBase
{
  void Setup();

protected:
  D3DLIGHT9 m_light;
  
public:
  CdiLightingBase(LPDIRECT3DDEVICE9 pDevice );

  CdiLightingBase( LPDIRECT3DDEVICE9 pDevice, D3DLIGHT9& light );

  virtual ~CdiLightingBase();
  
  // Set the lighing Position
  void SetLighingPosition(D3DXVECTOR3& Position);

  inline D3DLIGHT9& GetLight() { return m_light; }

  HRESULT Render( LPDIRECT3DDEVICE9 ) { return S_OK; }
  
  BOOL CanRender(void) const { return m_isEnabled; }

  BOOL SetRender(BOOL Enabled) 
  { 
    SetEnabled( Enabled ); 
    return m_isEnabled;
  } 
  // Set the Lighting Direction
  void SetLightDirection(D3DXVECTOR3& Direction);
};

